/**
 *  fileName:promise
 *  time:2022/3/14
 *  todo:$END$
 */

let goodboy = false
let getLv = new Promise((resolve, reject) => {
  if (goodboy) {
    resolve({
      msg: 'no no no'
    })
  } else {
    reject('asdasd')
  }
})

// getLv.then((fullfilled) => {
//   console.log(`fullfilled ==> `, fullfilled)
//   // console.log(`fullfilled.msg ==> `, fullfilled.msg)
// },reject => {
//   console.log(`reject ==> `, reject)
// }).catch(e => {
//   console.log(`e ==> `, e)
// })


let buyLip = (res) => {
  return Promise.resolve({
    lip:'hxek',
    getLv:res.msg
  })
}

getLv.then(buyLip)
  .then(fulfilled => {
    console.log(`fulfilled ==> `, fulfilled)
    console.log(`fulfilled.msg ==> `, fulfilled.msg)
  }).catch(e => {
    console.log(`e ==> `, e)
})



